﻿<script type="text/javascript">
    var AddRole = {};
    AddRole.Cancel = function () {
        $("#addRoleDiv").dialog('close');
    }
    AddRole.Confirm = function () {
        var para = $.extend(com.serializeObj("form2"), { method: "AddRole", action: $(top.document).find("#hidAction").val() });
        if ($("#form2").form("validate")) {
            com.ajax({
                type: "POST",
                url: "/Logic/BD/RoleAjax.aspx",
                data: para,
                success: function (data) {
                    com.message(data.state, data.msg);
                    $("#addRoleDiv").dialog('close');
                    $("#tbList").datagrid("reload")
                }
            });
        }
    }
</script>


<form id="form2" runat="server">
    <div style="height: 100%; overflow: auto">
        <div class="Container">
            <div>
                <input type="hidden" name="Id" />
            </div>
            <div class="fitem">
                <div class="label">角色名称:</div>
                <div class="control">
                    <input id="name" name="name" data-options="required:true" class="easyui-validatebox" />
                </div>
            </div>
            <div class="fitem">
                <div class="label">备注:</div>
                <div class="control">

                    <textarea id="remark" name="remark"></textarea>
                </div>
            </div>
        </div>
    </div>
    <div class="dialog-bottom">
        <input type="hidden" id="hidAddRole.Action" />
        <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-ok'" onclick="AddRole.Confirm()">确定</a>
        <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-cancel'" onclick="AddRole.Cancel()">取消</a>
    </div>
</form>

